<template>
  <div id="contentBox">
    <div class="searchBox">
      <el-form :inline="true" ref="searchForm" :model="searchForm" label-width="96px">
        <el-form-item label="申请日期起" prop="startDate">
          <el-date-picker :editable="false" v-model="searchForm.startDate" @change="debounceSeach" type="date" placeholder="选择日期" :picker-options="startDateOpt">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="申请日期止" prop="endDate">
          <el-date-picker :editable="false" @change="debounceSeach"  v-model="searchForm.endDate" type="date" placeholder="选择日期" :picker-options="endDateOpt">
          </el-date-picker>
        </el-form-item>

        <el-form-item label="订单号" prop='orderNumber'>
          <el-input v-model="searchForm.orderNumber" placeholder="请输入搜索内容..." @input.native="debounceSeach"></el-input>
        </el-form-item>
        <el-form-item label="融资经销商"  prop='dealerName'>
          <el-input v-model="searchForm.dealerName" placeholder="请输入搜索内容..." @input.native="debounceSeach">
          </el-input>
        </el-form-item>
        <el-form-item label="订单审核状态"  prop='status'>
          <el-select v-model="searchForm.status" placeholder="请选择"  @change="debounceSeach">
            <el-option label="全部" value=""></el-option>
            <el-option v-for="(item,index) in orderCode" :key="item" :value="index" :label='item' >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="订单复审状态"  prop='reviewStatus'>
          <el-select v-model="searchForm.reviewStatus" placeholder="请选择"  @change="debounceSeach">
            <el-option label="全部" value=""></el-option>
            <el-option v-for=" (item,index) in reviewStatus" :label='item' :key="item" :value="index">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item style="float:right">
          <el-button type="primary" @click="resetSearchForm('searchForm')">重置</el-button>
        </el-form-item>
      </el-form>
    </div>

		
    <div id="tableBox" style="margin:0 25px;">
      <el-table :data="tableData.data" border >
        <el-table-column label="订单号" width="140" fixed>
          <template scope="scope">
            <span>{{ scope.row.orderNumber }}</span>
          </template>

        </el-table-column>
        <el-table-column label="融资经销商">
          <template scope="scope">
            <span>{{ scope.row.dealerName }}</span>
          </template>
        </el-table-column>

        <el-table-column label="汽车总数量">
          <template scope="scope">
            <span>{{ scope.row.carSumNumber }}</span>
          </template>
        </el-table-column>
        <el-table-column label="订单状态">
          <template scope="scope">
            <span>{{ scope.row.statusString  }}</span>
          </template>
        </el-table-column>
        <el-table-column label="订单复审状态">
          <template scope="scope">
            <span>{{ scope.row.reviewStatusString  }}</span>
          </template>
        </el-table-column>

        <el-table-column label="申请时间">
          <template scope="scope">
            <span>{{getDates(scope.row.addTime)}}</span>
          </template>
        </el-table-column>
        <el-table-column label="操作"  fixed="right" >
          <template scope="scope" >
            <el-button size="small" 
             type="success"
                v-show="scope.row.status=='10020'|| scope.row.status=='10050'" 
                @click.native="formIsEdit($event)"
                :data-id='scope.row.mortgageOrderExtendId'>
                {{ addOrEdit(scope.row.status )  }}
            </el-button>
            
            <el-button  type="info" size="small"  @click.native="formIsEdit($event)" :data-id='scope.row.mortgageOrderExtendId'>查看</el-button>
            <el-button  type="success" size="small"  @click.native="determine(scope.row)"  v-show="scope.row.status=='10060'">准入库</el-button>
          </template>
        </el-table-column>
      </el-table>

    </div>
    
     <el-dialog title="库融验车管理" :visible.sync="dialogSendData.dialogFormVisible" :lock-scroll='true'
      top=5% :close-on-click-modal="false">
      <Popup   v-if="dialogSendData.dialogFormVisible" 
                :dialogSendData="dialogSendData" 
                :mortgageOrderExtendId='this.mortgageOrderExtendId' 
                :buttonValue="buttonValue"  v-on:Refresh="seachData()"></Popup>
    </el-dialog>

     <div class="block" style="text-align: center;margin-top: 15px;position:relative;">
		    <pagination v-on:refreshSeachData="seachData()"  :tableData="tableData"  :searchForm="searchForm"></pagination>
		</div>
  </div>
</template>


<script src='./index.js'>


</script>

